package com.mdn.steelcase.service;

import java.util.List;

import com.mdn.steelcase.exception.ReflectionException;


public interface GenericService<T> {

	T save(T instance);

	T updateField(T instance, String fieldName, Object value);

	T update(T instance);
	
	void delete(Long id);
	
	void delete(T instance);
	
	List<T> getAll();
	
	T get(Long id);
	
	boolean exist(Long id);
	
	List<T> findByColumn(String columnName, Object value);
	
	T findSingleByColumn(String columnName, Object value);
	
	List<T> findByExample(T instance, String...params) throws ReflectionException;
	
	T findSingleByExample(T instance, String...params) throws ReflectionException;
}
